package com.zt.bigdata.spark.dataalgorithms.chapter01

import com.zt.bigdata.spark.Constant

/**
  *
  */
object Main {
  def main(args: Array[String]): Unit = {
    var parameter = Parameter("local[2]", 1,
      s"${Constant.BASE_PATH}/chapter01input.txt")
    new SecondarySortUsingRepartitionAndSortWithinPartitions()
      .setAppName("SecondarySort")
      .process(parameter)

    parameter = Parameter("local[2]", 1,
      s"${Constant.BASE_PATH}/chapter02input.txt")
    new SecondarySortUsingGroupByKey()
      .setAppName("SecondarySortUsingGroupByKey")
      .process(parameter)

    parameter = Parameter("local[2]", 1,
      s"${Constant.BASE_PATH}/chapter02input.txt")
    new SecondarySortUsingCombineByKey()
      .setAppName("SecondarySortUsingCombineByKey")
      .process(parameter)
  }
}
